home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Sound / PlayGUI / PlayInfo < prev    next >
Text File  |  2000-02-23  |  3KB  |  142 lines

  1. G4C;PlayINFO by Richard Kapp 1999 ; MUST BE IN THE FIRST(!) LINE
  2. WINBIG 0 0 361 227 "MOD INFO"
  3. wintype 11110000
  4. WINFONT topaz_thin.font 8 000
  5.  
  6.  
  7. xonload
  8.         templ = no
  9.         unit = 0
  10.         
  11.        
  12.         loadimage PLAYGUI:SYS/book.iff info Workbench
  13.         guiopen PlayInfo
  14.         image 0 0 info
  15.  
  16. xonclose
  17.         freeimage book
  18.         guiquit PlayInfo
  19.  
  20. XMenu 'File' 'Load comment' '' ''
  21.  
  22. ReqFile  -1 -1 300 -30 'Choose file :' LOAD filename ''
  23. if $filename > ''
  24.    lvuse PlayInfo 1
  25.    lvchange $filename
  26.    ; now save it so as to write it to the clipboard
  27.    lvsave 'CLIPS:$unit'
  28. endif
  29.  
  30. XMenu 'File' 'Save comment' '' ''
  31.  
  32. ReqFile  -1 -1 300 -30 'Save as file :' SAVE savename ''
  33. if $savename > ' '
  34.    ifexists file $savename
  35.       ezreq 'File $savename exists.\nOverwrite ?' Overwrite|CANCEL choice
  36.       if $choice = 0
  37.          stop
  38.       endif
  39.    endif
  40.    lvsave $savename
  41. endif
  42.  
  43. XMenu 'File' 'Close' '' ''
  44.  
  45. freeimage book
  46. guiquit PlayInfo
  47.  
  48. XMenu 'Options' 'Edit comment' '' ''
  49.  
  50. if $templ = no
  51. CLI 'C:copy PlayGUI:SYS/template.txt ram:t'
  52. CLI 'C:run >NIL: C:ed ram:t/template.txt'
  53. templ = yes
  54. elseif $templ = yes
  55. CLI 'C:run >NIL: C:ed ram:t/template.txt'
  56. endif
  57.  
  58. XMenu 'Options' 'Clear comment' '' ''
  59.  
  60. lvuse PlayInfo 1
  61. lvclear
  62. lvsave 'CLIPS:$unit'
  63.  
  64. XMenu 'Options' 'Help' '' ''
  65. EZReq "You can write and edit your info via ED and view, save and load it here." "AHA" helpy
  66.  
  67. xBUTTON 240 180 60 15 "OKAY"
  68. freeimage book
  69. guiquit PlayInfo
  70.  
  71. XBUTTON 214 8 20 15 ">"
  72. ++unit
  73. gosub PlayInfo changeunit
  74.  
  75. XBUTTON 190 8 20 15 "<"
  76. --unit
  77. gosub PlayInfo changeunit
  78.  
  79. XTEXTIN 310 8 38 14 "" unit '0' 10
  80. gadid 2
  81. gosub PlayInfo changeunit
  82.  
  83. xRoutine ChangeUnit
  84. ; make sure the unit is 0-255
  85. if $unit > 255
  86.    unit = 0
  87. elseif $unit < 0
  88.    unit = 255
  89. endif
  90.  
  91.  
  92. lvuse PlayInfo 1
  93. lvchange "CLIPS:$unit"
  94. update PlayInfo 2 $unit
  95.  
  96. xBUTTON 240 50 60 15 "LOAD"
  97. ReqFile  -1 -1 300 -30 'Choose file :' LOAD filename ''
  98. if $filename > ''
  99.    lvuse PlayInfo 1
  100.    lvchange $filename
  101.    ; now save it so as to write it to the clipboard
  102.    lvsave 'CLIPS:$unit'
  103. endif
  104.  
  105. xBUTTON 240 70 60 15 "SAVE"
  106. ReqFile  -1 -1 300 -30 'Save as file :' SAVE savename ''
  107. if $savename > ' '
  108.    ifexists file $savename
  109.       ezreq 'File $savename exists.\nOverwrite ?' Overwrite|CANCEL choice
  110.       if $choice = 0
  111.          stop
  112.       endif
  113.    endif
  114.    lvsave $savename
  115. endif
  116.  
  117. XBUTTON 240 90 60 15 "CLEAR"
  118. lvuse PlayInfo 1
  119. lvclear
  120. lvsave 'CLIPS:$unit'
  121.  
  122. XLISTVIEW 13 40 145 170 "" clipline CLIPS:0 10 NUM
  123. gadid 1
  124.  
  125. xBUTTON 240 110 60 15 "EDIT"
  126. if $templ = no
  127. CLI 'C:copy PlayGUI:SYS/template.txt ram:t'
  128. CLI 'C:run >NIL: C:ed ram:t/template.txt'
  129. templ = yes
  130. elseif $templ = yes
  131. CLI 'C:run >NIL: C:ed ram:t/template.txt'
  132. endif
  133.  
  134. xBUTTON 240 130 60 15 "HELP"
  135. EZReq "You can write and edit your info via ED and view, save and load it here." "AHA" helpy
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.